package com.it.question.service.impl;

import java.util.List;
import com.it.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.it.question.mapper.XyQuestionMapper;
import com.it.question.domain.XyQuestion;
import com.it.question.service.IXyQuestionService;

/**
 * 问题反馈Service业务层处理
 * 
 * @author 云淡风轻
 * @date 2025-04-01
 */
@Service
public class XyQuestionServiceImpl implements IXyQuestionService 
{
    @Autowired
    private XyQuestionMapper xyQuestionMapper;

    /**
     * 查询问题反馈
     * 
     * @param id 问题反馈主键
     * @return 问题反馈
     */
    @Override
    public XyQuestion selectXyQuestionById(Long id)
    {
        return xyQuestionMapper.selectXyQuestionById(id);
    }

    /**
     * 查询问题反馈列表
     * 
     * @param xyQuestion 问题反馈
     * @return 问题反馈
     */
    @Override
    public List<XyQuestion> selectXyQuestionList(XyQuestion xyQuestion)
    {
        return xyQuestionMapper.selectXyQuestionList(xyQuestion);
    }

    /**
     * 新增问题反馈
     * 
     * @param xyQuestion 问题反馈
     * @return 结果
     */
    @Override
    public int insertXyQuestion(XyQuestion xyQuestion)
    {
        xyQuestion.setCreateTime(DateUtils.getNowDate());
        return xyQuestionMapper.insertXyQuestion(xyQuestion);
    }

    /**
     * 修改问题反馈
     * 
     * @param xyQuestion 问题反馈
     * @return 结果
     */
    @Override
    public int updateXyQuestion(XyQuestion xyQuestion)
    {
        xyQuestion.setUpdateTime(DateUtils.getNowDate());
        return xyQuestionMapper.updateXyQuestion(xyQuestion);
    }

    /**
     * 批量删除问题反馈
     * 
     * @param ids 需要删除的问题反馈主键
     * @return 结果
     */
    @Override
    public int deleteXyQuestionByIds(Long[] ids)
    {
        return xyQuestionMapper.deleteXyQuestionByIds(ids);
    }

    /**
     * 删除问题反馈信息
     * 
     * @param id 问题反馈主键
     * @return 结果
     */
    @Override
    public int deleteXyQuestionById(Long id)
    {
        return xyQuestionMapper.deleteXyQuestionById(id);
    }
}
